package com.jzo2o.market.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jzo2o.common.model.PageResult;
import com.jzo2o.common.model.Result;
import com.jzo2o.market.model.domain.Activity;
import com.jzo2o.market.model.dto.request.ActivityQueryForPageReqDTO;
import com.jzo2o.market.model.dto.request.ActivitySaveReqDTO;
import com.jzo2o.market.model.dto.response.ActivityInfoResDTO;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author itcast
 * @since 2023-09-16
 */
public interface IActivityService extends IService<Activity> {

    /**
     * 分页查询优惠券活动
     */
    PageResult<Activity> ispage(ActivityQueryForPageReqDTO activityQueryForPageReqDTO);

    /**
     * 增或修改优惠券活动
     */
    Result<Void> addsave(ActivitySaveReqDTO activitySaveReqDTO);

    /**
     * 根据ID查询优惠劵活动详情
     */
    ActivityInfoResDTO getupById(Long id);

    /**
     * 撤销活动
     */
    Result<Void> addrasd(Long id);

    void updateActivityStatusToOngoing();

    void updateActivityStatusToInvalid();
}
